<template>
    <h1>Parent</h1>
    <Child :msg="msg" @showMsg="showPar" ref="child"></Child>

    <h3 style="color: pink">{{chlidMsg}}</h3>
</template>

<script>

import Child from './Child'

export default {
    components: {
        Child
    },

    name: "Parent",
    data() {
        return {
            msg: 'from Parent msgczr',
            chlidMsg: ''
        }
    },
    methods: {
        showPar(data) {
            this.chlidMsg = data;
        }
    }
}
</script>

<style scoped>

</style>